CREATE TABLE [dbo].[tb_ItemsDeMenu]
(
[IdItemDeMenu] [int] NOT NULL IDENTITY(1, 1),
[Nombre] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Accion] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ItemPadre] [int] NULL,
[TieneSubitems] [bit] NOT NULL,
[Icono] [varchar] (75) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Orden] [tinyint] NOT NULL,
[PaginaListado] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PaginaEdicion] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PaginaRegistro] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VistaBusqueda] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VistaListado] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VistaEdicion] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VistaRegistro] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VistaRelacion] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TablaSubyacente] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CampoControl] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CampoRelacion] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TituloPagina] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TituloPath] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Reporte] [int] NULL,
[Permiso] [int] NULL,
[BorrarEnListado] [bit] NULL,
[ProcedimientoAlmacenado] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OrdenEnListado] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MantenerCriterioEnListado] [bit] NULL,
[ImprimirRegistro] [bit] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_ItemsDeMenu] ADD CONSTRAINT [PK_tblItemsDeMenu] PRIMARY KEY CLUSTERED  ([IdItemDeMenu]) WITH (FILLFACTOR=100) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_ItemsDeMenu] WITH NOCHECK ADD CONSTRAINT [FK_tbItemsDeMenu_tbItemsDeMenu] FOREIGN KEY ([ItemPadre]) REFERENCES [dbo].[tb_ItemsDeMenu] ([IdItemDeMenu])
GO
